package com.sensePlusVR.utils;

import android.app.Dialog;
import android.content.Context;
import android.view.WindowManager;

public class MyDialogUtil {

	public static void setDialogFullScreen(Context context, Dialog dialog) {
		WindowManager.LayoutParams params = dialog.getWindow().getAttributes();
		params.width = DensityUtil.getScreenWidth(context);
		
		params.height = DensityUtil.getScreenHeight(context);
		dialog.getWindow().setAttributes(params);
	}
	
	public static void setDialogFullScreenGuide(Context context, Dialog dialog) {
		WindowManager.LayoutParams params = dialog.getWindow().getAttributes();
		params.width = DensityUtil.getScreenWidth(context);
		//暂解决三星s8不能全屏问题
		params.height = DensityUtil.getScreenHeight(context) + 800;
		dialog.getWindow().setAttributes(params);
	}
	
	
	public static void setDialogSize(Context context, Dialog dialog,int with,int height) {
		WindowManager.LayoutParams params = dialog.getWindow().getAttributes();
		params.width = with;
		params.height = height;
		dialog.getWindow().setAttributes(params);
	}
	
}
